GXGetBitmapParts
You can use theGXGetBitmapParts
function to extract a rectangular section of pixels from a bitmap.
gxShape GXGetBitmapParts(gxShape source, const gxLongRectangle *bounds);
source
- A reference to the bitmap shape containing the pixels to extract.
bounds
- A pointer to a
gxRectangle
indicating which part of the bitmap to extract.- function result
- A reference to a new bitmap shape containing only the extracted section
of the source bitmap shape.DESCRIPTION
TheGXGetBitmapParts
function extracts the pixels whose row number and column number fall within the boundaries of the rectangle pointed to by thebounds
parameter, encapsulates the extracted pixel image in a new bitmap shape, and returns a reference to the new bitmap shape as the function result.The returned bitmap shape has the same pixel size as the source bitmap shape. The returned bitmap shape also shares the same color space, color set, and color profile as the source bitmap shape.
The pixel image of the returned bitmap is allocated in QuickDraw GX memory.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil parameter_is_nil parameter_out_of_range (debugging only) point_does_not_intersect_bitmap (debugging only) Warnings shape_does_not_contain_a_bitmap (debugging only) SEE ALSO
For examples using this function, see "Editing Part of a Bitmap" beginning on page 5-53.For information about the
gxBitmap
structure, see "The Bitmap Geometry Structure" beginning on page 5-62.For information about the
gxLongRectangle
structure, see "The Long Rectangle Structure" on page 5-64.For information about pixels and pixel images, see "Bitmap Geometries" beginning on page 5-5.
To examine a single pixel of a bitmap, use the
GXGetShapePixel
function, which is described on page 5-71.To change a section of a bitmap, use the
GXSetBitmapParts
function, which is described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help